package file;

import java.io.FileOutputStream;

/**
 * @time: 2019/11/26 17:45
 * @author: baozi
 * 字节输出流
 */
public class OutputStreamDemo1 {


    public static void main(String[] args) {

        try {
            //new File("a.txt").createNewFile();

           // FileOutputStream f=new FileOutputStream("c.txt",true);//第二个参数是否追加
            FileOutputStream f=new FileOutputStream("c.txt",true);
            byte[] a={110,112,113};
            //f.write(a);//会更具ASCLL表转
           // f.write("11包子22".getBytes());
            f.write("\r\n".getBytes());//换行 win \r\n linux \n
            f.write(99);
            f.write(100);
            f.write(101);
           // f.write("11包子22".getBytes());
            f.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }


}
